Interactive Contour of J(m,b) for (1,2),(2,1),(3,3),(4,2),(5,4)

m = 0.50
b = 0.90
J(m,b) = 0.540000 at m*=0.500, b*=0.900

Notes: This uses MSE (mean of squared residuals). The unique minimizer is (m*, b*) = (0.500, 0.900). Move the sliders to change (m,b). The left subplot shows the J(m,b) contours and current (m,b) point; the right subplot shows the data and the line y=mx+b.